%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This file is part of the book
%%
%% Algorithmic Graph Theory
%% http://code.google.com/p/graph-theory-algorithms-book/
%%
%% Copyright (C) 2009--2011 Minh Van Nguyen <nguyenminh2@gmail.com>
%%
%% See the file COPYING for copying conditions.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DontPrintSemicolon
\SetAlgoNoLine
%%
%% data section
\SetKwData{NULL}{\footnotesize{NULL}}
%%
%% input
\KwIn{A binomial heap $H$ and a vertex $v$.}
%%
%% output
\KwOut{The heap $H$ with $v$ inserted into it.}
\BlankLine
%%
%% algorithm body
$H_1 \assign$ empty binomial heap\;
$\headElem[H_1] \assign v$\;
$\parent[v] \assign \NULL$\;
$\child[v] \assign \NULL$\;
$\sibling[v] \assign \NULL$\;
$\degree[v] \assign 0$\;
$H \assign$ merge $H$ and $H_1$ as per Algorithm~\ref{alg:tree_data_structures:merge_binomial_heaps}\;
